package com.luo.dao.impl;

import com.luo.dao.AddressMappers;
import com.luo.dao.ClassMappers;
import com.luo.model.Address;
import com.luo.model.OneClass;
import com.luo.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * 功能：
 * 作者：Luo。
 * 日期：2024/3/22 9:47
 */
public class AddressDaoImpl implements AddressMappers {
	@Override
	public List<Address> queryAddressByUserId(String id) {
		SqlSession sqlSession = SqlSessionUtil.getSqlSession();
		AddressMappers mapper = sqlSession.getMapper(AddressMappers.class);
		List<Address> address = mapper.queryAddressByUserId(id);
		sqlSession.commit();
		sqlSession.close();
		return address;
	}
}
